/*
 * Copyright(C) 2010 the original author or authors.
 *
 * Change History Log
 * ----------------------------------------------------
 * Version: 1.0
 * Date: 2011-5-22
 * Author: wangzl
 * ----------------------------------------------------
 */
package com.seemsea.entity.admin.coupon;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import com.seemsea.dao.IGenericEntity;
import com.seemsea.entity.admin.BaseEntity;

/**
 * 
 * 
 * @author wangzl
 * @since 2011-5-22
 */
@Entity
@Table(name="coupon_product")
public class Product extends BaseEntity implements IGenericEntity<String>{
	/**
	 * 
	 */
	private static final long serialVersionUID = 5662567915796743916L;
	@Id
	private String code;
	private String name;
	private String logo;
	@Temporal(TemporalType.TIMESTAMP)
	@Column(updatable=false,nullable=false)
	private Date createTime;
	@Temporal(TemporalType.TIMESTAMP)
	private Date updateTime;
	
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Date getCreateTime() {
		if(createTime == null){
			createTime = new Date();
		}
		return createTime;
	}
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	public Date getUpdateTime() {
		return updateTime;
	}
	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	public String getLogo() {
		return logo;
	}
	public void setLogo(String logo) {
		this.logo = logo;
	}
}
